Shallow Backtracking in Prolog Programs
نویسنده
چکیده
The efficiency of Prolog compilers is increasing rapidly but the Prolog programs still cannot compete with traditional languages when executing simple conditionals. In this paper we present a possibility to increase Prolog performance by exploiting the shallow backtracking. Shallow backtracking is initiated when a call fails to unify with the head of a clause and it backtracks to another clause in the same procedure, as opposed to deep backtracking which requires going back in the search tree and trying an alternative of a previous goal. We introduce modified OR-level instructions and data management and discuss the impact on performance of Prolog programs.
منابع مشابه
On the Efficiency of Optimising Shallow Backtracking in Compiled Prolog
The cost of backtracking has been identified as one of the bottlenecks in achieving peak performance in compiled Prolog programs. Much of the backtracking in Prolog programs is shallow, i.e. is caused by unification failures in the head of a clause when there are more alternatives for the same procedure, and so special treatment of this form of backtracking has been proposed as a significant op...
متن کاملFactoring Pure Logic Programs
This paper describes a factoring algorithm that removes deep backtracking from logic programs that is in general applicable to a large subclass of well-moded logic programs. Originally developed for the pure logic programming language Elf [10], our results can also be applied to other logic programming languages, such as Prolog and -Prolog [9], as well. Further applications of factoring include...
متن کاملSelective Backtracking for Logic Programs
We present a selective backtracking method for Horn clause programs, as applied to Prolog (2)[8)(11)[12], a programming language based on first-order predicate calculus (3)(4)~ developed at the university of Marseille (18]. This method is based on the general method expounded in (7] for backtracking intelligently in AND/OR trees. It consists, essentially, in avoiding backtracking to any goal wh...
متن کاملConcurrency and communication in Delta Prolog
We describe and exemplify the logic programming language Delta Prolog, an extension to Prolog to include AND-concurrency and interprocess communication. Besides its declarative semantics, its operational semantics, comprising distributed backtracking, is especially emphasized. The extension is obtained, at the language level, by introducing three additional goal types: splits, events, and choic...
متن کاملThe Performance of Parallel Prolog Programs
This paper presents performance results for a parallel execution model for Prolog that supports AND-parallelism, oa-parallelism, and intelligent backtracking. The results show that restricted ANo-parallelism is of limited benefit for small programs, but produced speedups from 7 to 10 on two large programs. on-parallelism was generally not found to be useful for the benchmarks examined if the se...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1995